package gui.fileImportWindow;

import java.util.Observable;

public class ImportStatus extends Observable {
	private int imported;
	private int existing;
	private int erronous;

	public ImportStatus() {
		this.imported = 0;
		this.existing = 0;
		this.erronous = 0;
	}

	public int getImported() {
		return this.imported;
	}

	public void setImported(int imported) {
		this.imported = imported;
		this.setChanged();
		this.notifyObservers();

	}

	public int getExisting() {
		return this.existing;
	}

	public void setExisting(int existing) {
		this.existing = existing;
		this.setChanged();
		this.notifyObservers(this);
	}

	public int getErronous() {
		return this.erronous;
	}

	public void setErronous(int erronous) {
		this.erronous = erronous;
		this.setChanged();
		this.notifyObservers();
	}

	@Override
	public String toString() {
		StringBuilder toReturn = new StringBuilder();
		toReturn.append("Importiert: ");
		toReturn.append(this.imported);
		toReturn.append(" ");
		toReturn.append("Existiert: ");
		toReturn.append(this.existing);
		toReturn.append(" ");
		toReturn.append("Fehlerhaft: ");
		toReturn.append(this.erronous);
		toReturn.append("\n");
		return toReturn.toString();
	}
}
